{# Overseer > Deployments' pieces (overseer_deploy_actions): one recipe for a control that asks ``aegis deploy-agent`` (a write, answered by its job, which swaps into the card's job panel); the destroy form that the server and a failed provision both offer, and that provision's resume (``stopped``); a step on the way to a server; why the agent cannot be asked; the job panel; where something runs (``place``: a provider's mark and name); a fragment's reload while it waits on the agent; a part of the new-server form (``panel``: waiting on the agent, why it failed, or what it found); a picker of providers by their logos, and a terminal way folded under it (``picker``, ``by_hand``); and ``note``, the muted paragraph's classes. #} {% from "components/macros/form.html" import action, field, text_input %} {% from "components/macros/icons.html" import icon %} {% from "components/macros/layout.html" import avatar, badge, card, command, dropdown, fold, menu_item, progress %} {% macro note() %}text-sm text-aegis-muted space-y-2{% endmacro %} {# ``reload`` (overseer_deploy_actions: url, trigger) as the hx attributes a fragment asks again with, or nothing once it is ready. #} {% macro reloads(reload) %}{% if reload %} hx-get="{{ reload.url }}" hx-trigger="{{ reload.trigger }}"{% endif %}{% endmacro %} {# What a part of the new-server form waits on the agent for, over a moving bar. #} {% macro waiting(said) %}
{{ said }}
{{ progress(none, label=said) }}{{ said }}{{ f.error }}
{{ action("Try again", 'data-retry hx-get="' ~ f.retry ~ '" hx-target="closest [data-part]" hx-swap="outerHTML"') }} {% endmacro %} {# A part the agent is asked for (``f``, from overseer_deploy_form: the new-server form's PANELS, the card's rollback and live build): waiting on the agent, why it could not be had, or what it found (the caller's body). ``name`` is its data attribute; ``boxed`` frames it. #} {% macro panel(name, f, said_waiting, said_failed, boxed=True) %}{% if f.checked %}Checked {{ f.checked }}{% endif %}
{% endif %} {% endif %}What it created is still in your account, and billed. Resuming carries on from where it stopped.
{{ ask("Resume", partials, "resume", tone="primary") }} {% call fold("Delete what it made instead", "data-delete") %}{{ destroy_form(partials, name) }}{% endcall %}{{ s.title }}{% if s.summary %} {{ s.summary }}{% endif %}
{% if s.open %}Deploy agent: {{ agent.said }}
{% elif agent.state == "no-redis" %}Deploying from here needs Redis: the Overseer hands each action to aegis deploy-agent on your machine through the project's Redis, so your SSH key never enters the app.
{{ command("aegis add redis") }}
Redis did not answer: {{ agent.error }}
{% elif agent.state == "stale" %}{{ agent.error }} {{ agent.said }}
{% elif agent.state == "no-agent" %}No deploy agent is running: make serve runs it as the stack's deploy-agent service, whose log (docker compose logs deploy-agent) says why it stopped, or run {{ command(agent.command) }} in the project directory.
A small process on your machine that does what you ask on this page: create a server, deploy, back up, roll back, destroy. make serve runs it as the stack's deploy-agent service, on the aegis this project pins.
It runs there, not in the app, and signs through your machine's ssh-agent, so your SSH key never leaves it. The cloud token comes from Deployments > Settings (or .env), or from the agent's own environment.
{{ label }}
{% call dropdown(current, align="left") %} {% for d in items %} {{ menu_item(mark(d) if d.key else d.name, 'data-value="' ~ d.key ~ '" x-on:click="' ~ model ~ ' = \'' ~ d.key ~ '\'" x-bind:aria-current="' ~ model ~ ' === \'' ~ d.key ~ '\' ? \'true\' : null"' ~ (' aria-current="true"' if d.key == chosen else '')) }} {% endfor %} {% endcall %}{{ r }}{{ ", " if not loop.last }}{% endfor %} from your environment{% endif %}{{ command(e.command) }}
This is a deployed server. Redeploys come from the dev Overseer, or from CI:
{{ command(actions.command) }}